import request from '../../utils/request'

//登录
export function login(code, password) {
  return request({
    url: '/edm/teacher/login',
    method: 'post',
    data: {
      code,
      password
    }
  })
}

//根据教师ID获取教师信息
export function getInfoById(id) {
  return request({
    url: `/edm/teacher/info/${id}`,
    method: 'get',
    params: {}
  })
}

//根据教师ID获取教师信息
export function updatePwd(id, password) {
  return request({
    url: `/edm/teacher/update`,
    method: 'post',
    data: {
      id,
      password
    }
  })
}

//验证密码是否正确
export function validPwd(id, password) {
  return request({
    url: `/edm/teacher/validPwd`,
    method: 'post',
    data: {
      id,
      password
    }
  })
}
